package com.startasone.service.Impl;

import com.startasone.mapper.DeptLogMapper;
import com.startasone.pojo.DeptLog;
import com.startasone.service.DeptLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import static org.springframework.transaction.annotation.Propagation.REQUIRES_NEW;

@Service
public class DeptLogServiceImpl implements DeptLogService {
    @Autowired
    private DeptLogMapper deptLogMapper;
    @Override
    @Transactional(propagation= REQUIRES_NEW)
    public void createDeptLog(DeptLog dept) {
        deptLogMapper.createDeptLog(dept);
    }
}
